<?php


namespace app\api\validate;

use think\Validate;

class Merchant extends Validate
{
    protected $rule =   [
        'id'=>'require',
        'merchant_phone'  => 'require|mobile',
        'merchant_name'  => 'require',
        'shop_logo' => 'require',
        'shop_name' => 'require',
        'shop_banner' => 'require',
        'shop_address' => 'require',
        'coordinate' => 'require',
    ];

    protected $message  =   [
        'id.require' => 'id不得为空',
        'merchant_phone.require' => '手机号不得为空',
        'merchant_name.require' => '联系人不得为空',
        'shop_logo.require' => '店铺logo不得为空',
        'shop_name.require' => '店铺名称不得为空',
        'shop_banner.require' => '店铺轮播图不得为空',
        'shop_address.require' => '店铺地址不得为空',
        'coordinate.require' => '定位不得为空',
    ];

    protected $scene = [
        'apply' => ['shop_name','shop_address','merchant_phone','merchant_name','coordinate'],
    ];

}